package com.zdy.im.chat;


import com.alibaba.fastjson.JSONObject;
import com.sixeco.framework.common.api.ApiDesc;
import com.sixeco.framework.common.data.BaseBeanClone;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author 作者 : zdy
 * @CreateDate 创建时间: 2021-02-30
 * @WeeK 星期: 星期五
 * @Version 版本: v1.0.0
 * <pre>
 *
 *  @Description (说明):  消息通信对象信息;
 *
 *
 **/

public class ChatMessageBody extends BaseBeanClone implements Serializable {

    public static ChatMessageBody build(){
        return new ChatMessageBody();
    }

    /**
     * 消息来源用户名
     */
    @ApiDesc(value = "消息发送用户ID",required = 1)
    private long sendUserId;
    /**
     * 消息来源用户名
     */
    @ApiDesc(value = "消息发送用户名",required = 1)
    private String sendUserName;

    /**
     * 发送者头像
     */
    @ApiDesc(value = "消息发送者头像",required = 1)
    private String sendUserImg;

    /**
     * 发送者时间
     */
    @ApiDesc(value = "发送者时间",required = 0)
    private Date sendTime;

    /**
     * 服务端时间戳毫秒数
     */
    @ApiDesc(value = "服务端时间戳毫秒数",required = 0)
    private Date serviceTime;

    /**
     * 消息的来源ID（如果是私聊，则是用户id，如果是群聊，则是群组id）
     *
     */
    @ApiDesc(value = "消息的来源ID（如果是私聊，则是用户id，如果是群聊，则是群组id）,接收到消息时使用",required = 0)
    private long messageId;

    /**
     * 消息唯一值id,使用雪花算法生成唯一id;用于排序和搜索使用
     */
    @ApiDesc(value = "消息唯一值id,使用雪花算法生成唯一id,接收到消息时使用",required = 0)
    private long globalId;

    /**
     * 消息类型 friend
     */
    @ApiDesc(value = "1.文本,包括表情,2.图片,3.视频,4.名片,5.文本和图片,6.文本和视频,7.图片和视频,8.分享群",required = 0)
    private int messageType;

    /**
     * 消息内容,只要是包括文本信息,或者json信息
     */
    @ApiDesc(value = "消息内容,只要是包括文本信息,或者json信息",required = 0)
    private String content;

    /**
     * 消息内容图片链接
     */
    @ApiDesc(value = "消息内容图片链接",required = 0)
    private String contentImg;

    /**
     * 消息内容视频链接
     */
    @ApiDesc(value = "消息内容视频链接",required = 0)
    private String contentVideo;

    /**
     * 是否本人发送
     */
    @ApiDesc(value = "是否本人发送,1.是,0.否",required = 0)
    private boolean mine;

    /**
     * 消息的接收id
     */
    @ApiDesc(value = "消息的接收id,私聊为用户id,群聊为群id",required = 1)
    private long toId;

    /**
     * 消息的接收者名称
     */
    @ApiDesc(value = "消息的接收者名称",required = 1)
    private String toUserName;

    /**
     * 消息的接收者名称,如果是群则为空
     */
    @ApiDesc(value = "消息的接收者图片",required = 1)
    private String toUserImg;


    /**
     * 1 已读 0 未读
     */
    @ApiDesc(value = "变更消息类型,0.未读,1.已读,2.撤销,3.删除")
    private int readStatus;

    /**
     * 1用户 0 群组
     */
    @ApiDesc(value = "1用户 0 群组")
    private int type;

    /**
     * 扩展参数字段
     */
    @ApiDesc(value = "扩展参数字段")
    protected JSONObject ext;


    public long getSendUserId() {
        return sendUserId;
    }


    public void setSendUserId(long sendUserId) {
        this.sendUserId = sendUserId;
    }

    public String getSendUserName() {
        return sendUserName;
    }

    public void setSendUserName(String sendUserName) {
        this.sendUserName = sendUserName;
    }

    public String getSendUserImg() {
        return sendUserImg;
    }

    public void setSendUserImg(String sendUserImg) {
        this.sendUserImg = sendUserImg;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public Date getServiceTime() {
        return serviceTime;
    }

    public void setServiceTime(Date serviceTime) {
        this.serviceTime = serviceTime;
    }

    public long getMessageId() {
        return messageId;
    }

    public void setMessageId(long messageId) {
        this.messageId = messageId;
    }

    public long getGlobalId() {
        return globalId;
    }

    public void setGlobalId(long globalId) {
        this.globalId = globalId;
    }

    public int getMessageType() {
        return messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContentImg() {
        return contentImg;
    }

    public void setContentImg(String contentImg) {
        this.contentImg = contentImg;
    }

    public String getContentVideo() {
        return contentVideo;
    }

    public void setContentVideo(String contentVideo) {
        this.contentVideo = contentVideo;
    }

    public boolean isMine() {
        return mine;
    }

    public void setMine(boolean mine) {
        this.mine = mine;
    }

    public long getToId() {
        return toId;
    }

    public void setToId(long toId) {
        this.toId = toId;
    }

    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public int getReadStatus() {
        return readStatus;
    }

    public void setReadStatus(int readStatus) {
        this.readStatus = readStatus;
    }

    public String getToUserImg() {
        return toUserImg;
    }

    public void setToUserImg(String toUserImg) {
        this.toUserImg = toUserImg;
    }

    public JSONObject getExt() {
        return ext;
    }

    public void setExt(JSONObject ext) {
        this.ext = ext;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
